import { useLoginStore } from './store/login/login'
import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from '@/App.vue'

import router from '@/router'

import 'normalize.css'
import '@/assets/css/index.scss'
import 'element-plus/theme-chalk/el-message.css'

import * as ElementPlusIconsVue from '@element-plus/icons-vue' // 导入图标

const app = createApp(App)
const pinia = createPinia()

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component) // 将所有图标全局注册
}

app.use(pinia)
const LoginStore = useLoginStore()
LoginStore.loadLocalCacheAction()
app.use(router)
app.mount('#app')
